//
//  YuLeViewModel.swift
//  StudyDY
//
//  Created by yinchangming on 2018/7/9.
//  Copyright © 2018年 yinchangming. All rights reserved.
//

import UIKit
/**
 娱乐部分请求网络数据
 
 **/
class YuLeViewModel: NSObject {
    lazy var  anchorCatgary=[AnchorCatgary]()
}
extension YuLeViewModel{
    func requstData(resultCallBack :@escaping ()->()){
        NetTools.requsetData(urlStr: getHotRoom, type: .get) { (result) in
            let resultDict=result as![String:Any]
            let dataArr=resultDict["data"] as! [[String :  Any]]
            for dict in dataArr{
                self.anchorCatgary.append(AnchorCatgary(dict: dict))
            }
            resultCallBack()
        }
        
    }
}
